<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

// +----------------------------------------------------------------------+
// | Treacle PHP Framework Version 0.10                                   |
// +----------------------------------------------------------------------+
// | Copyright (c) 2007 Treacle.cn All rights reserved.					  |
// +----------------------------------------------------------------------+
// | Licensed under the Apache License, Version 2.0 (the 'License');      |
// | you may not use this file except in compliance with the License.     |
// | You may obtain a copy of the License at                              |
// | http://www.apache.org/licenses/LICENSE-2.0                           |
// | Unless required by applicable law or agreed to in writing, software  |
// | distributed under the License is distributed on an 'AS IS' BASIS,    |
// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or      |
// | implied. See the License for the specific language governing         |
// | permissions and limitations under the License.                       |
// +----------------------------------------------------------------------+
// | Author: BoPo <ibopo@126.com>										  |
// +----------------------------------------------------------------------+
/**
 * 初始化缓存函数文件
 *
 * @author BoPo <ibopo@126.com>
 * @link http://www.treacle.cn/
 * @copyright Copyright &copy; 2007 Treacle
 * @license http://www.treacle.cn/license/
 * @version $Id$
 * @package caching
 */

/**
 * 初始化缓存函数
 *
 * @package	caching
 * @author BoPo <ibopo@126.com>
 * @since 0.10
 * @version	$Id $
 */

function &CACHE($params = null)
{
	$driver		= ($params == null) ? $config['driver'] : $params;
	require_once(BASEPATH.'caching/Cache_driver'.EXT);
	require_once(BASEPATH.'caching/drivers/'.$driver.'_driver'.EXT);
	$drivers	= $driver.'_driver';
	$cache		= &new $drivers($params);
	return $cache;
}
/*
+---------------------------------------------------------------------------
|   Last Modified By BoPo
|   Date: Wed Sep 05 17:29:32 CST 2007
+--------------------------------------------------------------------------
*/
?>